package gentle.service;

import com.baomidou.mybatisplus.plugins.Page;
import gentle.entity.*;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 *
 *
 * @author py
 * @Date 2018年4月19日23:15:54
 */
public interface IDoctorLookedService {
    List<DoctorLookedInfo> selectPageListByQueryGetMap(Page<DoctorLookedInfo> page, SearchDoctorLookedInfo info);

    int getQueryPagesCount(Page<DoctorLookedInfo> page, SearchDoctorLookedInfo searchInfo);

    List<DoctorLookedInfo> selectPageListByDoctorRevisit(Page<DoctorLookedInfo> page, SearchDoctorLookedInfo info);

    int getQueryPagesRevisitCount(Page<DoctorLookedInfo> page, SearchDoctorLookedInfo searchTheInfo);


    List<DoctorLookedInfo> selectDoctorGetMap(Page<DoctorLookedInfo> page, SearchDoctorLookedInfo info);

    int getQueryPagesDoctorCount(Page<DoctorLookedInfo> page, SearchDoctorLookedInfo searchTheInfo);

    List<ConsultantInfo> getDataList(String timeSlot);

    List<ConsultantdInfo> getListed(String timeSlot);

    List<ConsultantsoInfo> getListedDoctor(String timeSlot);

    List<ConsultantdInfo> getJysListed(String timeSlot);

    List<ConsultantsInfo> consultRestDoctor(String timeSlot);

    CustomerInfo selectOneById(String customerId,String abbreviation);

    CustomerInfo selectOneByReservationId(String reservationsId,String abbreviation);

    //统计医生收费金额
    double totalMoney(String reach, String payServiceName, String startTime, String endTime, String abbreviation,String userAccount, String areaAbbreviation);

    List<DoctorLookedInfo> alltotal(String reach,String revisitStatus,String startRevisitTime,String endRevisitTime,String revisit,String createName,
                                    String startCreateTime,String endCreateTime, String abbreviation, String outpatientName);

    //医生划价预览表格
    List<DoctorLookedInfo> selectDoctorChargePrice(Page<DoctorLookedInfo> page, SearchDoctorLookedInfo info,String abbreviation);

    //得到医生收费明细
    List<DoctorLookedInfo> selectChargeSchedule(Page<DoctorLookedInfo> page, SearchDoctorLookedInfo info,String userAccount,String abbreviation,String areaAbbreviation);

    //查询病历
    List<CaseInfo> getArchivings(String id);

    int deleteSfById(String id);

    int deleteJzById(String id);

    int deleteSjById(String id);

    int deleteJgById(String id);

    //修改预约备注提交
    int updateRemarksReservationOk(String customerId, String remarksReservation, String userAccount, String userId, String abbreviation, String outpatientName);

    //修改看诊项目提交
    int updAppointmentPayServiceOK(String customerId, String projectData, String userAccount, String userId, String abbreviation, String outpatientName);

    //查看改动日志
    List<CustomerReservationsUpdateLogInfo> getList(Page<CustomerReservationsUpdateLogInfo> page, SearchCustomerReservationsUpdateLogInfo info);
    int getQueryPagesCount(Page<CustomerReservationsUpdateLogInfo> page, SearchCustomerReservationsUpdateLogInfo searchInfo);

    //查看 随访 改动日志
    List<DoctorDailyLog> getDocotrDailyLogList(Page<DoctorDailyLog> page, SearchDoctorDailyLog info);
    int getDailyPageCount(Page<DoctorDailyLog> page, SearchDoctorDailyLog searchInfo);

    //病历模板层级添加
    int add_Oblogs(String oneClass, String twoClass,String userAccount);

    // 病历模板另存为
    int addCaseContent(String caseName, String zhushu, String nowMedicalHistory, String beforeMedicalHistory, String mouthCheck, String auxiliaryCheck, String remedyPlan, String diagnose
            , String dispose, String doctorAdvice, String oblogid,String userAccount);

    //获取病历模板信息
    CaseInfo getCaseContent(String id);

    //删除模板
    int deleteCaseContent(String id,String userAccount);

    //修改保存黄页编号
    int updateNumber(String customerId, String yellowNumber,String abbreviation,String userAccount,String userId);

    // 添加就诊记录
    int addRecord( String customerId, String doctor, String diagnoseTime, String expenditureProject, String diagnoseDetail, String remarks, String abbreviation);

    List<PayServicedInfo> getDealInfoList(String operationTime, String reservationsId);

    List<IconInfo> getCurrentList(String num, String reservationsId);

    List<PayServicedInfo> getOpenBillLisHuajia(String operationTime, String reservationsId, String abbreviation,String areaAbbreviation);

    //查询 划价的记录
    List<PayServicedInfo> getOpenBillListf(String operationTime, String reservationsId,String abbreviation,String areaAbbreviation);

    int ensure(String customerId, String reservationsId, String[] str, String doctor, String remarks ,String abbreviation);

    int checkOut(String customerId, String reservationsId, String[] str, String doctor, String remarks, String processUnit,
                 String status, String store, String picker, String phone, String deliveryTime, String pickUpTime ,String abbreviation);

    List<DoctorTechnologyInfo> technologyTableList( String reservationsId, String abbreviation);

    List<DoctorTechnologyProcessingInfo> processingTableList(String reservationsId, String abbreviation);

    int updateTechnology(String doctor, String id, String remarks, String leftUp, String rightUp, String leftDown, String rightDown, String arrivalStore, String payServiceName,
                         String number, Double price, String type, String processUnit, String status, Double amount, Double amountActually);

    int updateConsumable(String doctor, String id, String remarks, String leftUp, String rightUp, String leftDown, String rightDown, String arrivalStore, String consumableName,
                         String number, String type, Double price, Double amount, Double amountActually);

    int deleteProcess(String ids);

    int deleteTec(String ids);

    //医生业绩查询 表格
    List<DoctorChangePriceInfo> selectDoctorPerformanceGetMap(Page<DoctorChangePriceInfo> page, SearchDoctorChangePriceInfo info,String abbreviation,String userAccount);

    List<DoctorChangePriceInfo> selectDoctorPerformanceGetFen(Page<DoctorChangePriceInfo> page, SearchDoctorChangePriceInfo info,String abbreviation,String userAccount);

    int getQueryPagesPerformanceCount(Page<DoctorChangePriceInfo> page, SearchDoctorChangePriceInfo searchTheInfo,String abbreviation,String userAccount);

    int getQueryPagesCountFen(Page<DoctorChangePriceInfo> page, SearchDoctorChangePriceInfo searchTheInfo,String abbreviation,String userAccount);

    //查看客户的所有病例列表
    List<CaseInfo> caseTableList( String customerId, String abbreviation);

    //删除回访
    int DeleteRevisit(String id,String userAccount, String roleName, String userId, String outpatientName );

    //根据customerId改客户状态
    int updateCustomerArrivalStatus(int arrivalStatus, String customerId, String abbreviation);

    //病历保存
    String insert(CaseInfo info);

    int updateStatusS(String id);

    //病历保存 点完成治疗
    String insert1(CaseInfo info);

    //修改病历
    int update(CaseInfo info,String userAccount, String abbreviation, String userId, String outpatientName);

    int updateFinsh(CaseInfo info,String abbreviation);

    //项目是否结束
    int choiceTc(String caseId, String statusic);

    int addBoLogValue(String oneClass, String twoClass);

    //统计查询
    List<ConsultantInfo> change(String param1, String customerAgeEnd,String customerSex, String customerAgeStart, String doctor, String abbreviation);

    int addsf(String remarks, String title, String userAccount);
    int addjg(String remarks, String title, String userAccount);
    int addjz(String remarks, String title, String userAccount);
    int addsj(String remarks, String title, String userAccount);

    //再诊确认提交
    int zaizhen(String zaiRemarks, String zaiPeople, String customerId, String abbreviation);

    List<SfInfo> getSjList(String userAccount);

    List<SfInfo> getJzList(String userAccount);

    List<SfInfo> getSfList(String userAccount);

    List<JgInfo> getJgList(String userAccount);

    SfInfo getSfById(String id);

    SfInfo getJzById(String id);

    SfInfo getSjById(String id);

    SfInfo getJgById(String id);

    int deleteCaseInfo(String id, String customerId, String abbreviation, String userAccount, String userId, String outpatientName);

    int deleteCases(String caseId);

    List<PayServicedInfo> changePriceTable(String reservationsId,String abbreviation, String userAccount ,String areaAbbreviation);

    int updateDoctor(String doctor, String customerId, String remarks, String time, String optType ,String abbreviation, String userAccount, String userId, String outpatientName);

    //转诊
    int referralerPerson(String referralerPersoned, String customerId, String remarks, String referralerPerson, String abbreviation);

    int deletePrice(String createTime);

    //医生划价 业绩
    int changePrice(String id2, String customerId, String payServiceName, String remarks, Double accountArrears, Double serviceActualPay, Double deductionAmount, Integer payServiceNum, String abbreviation, String userAccount);

    //划价记录
    List<DoctorChangePriceInfo> getPriceInfo(String id2);

    int startTreatment(String customerId,String abbreviation,String userId,String userAccount,String outpatientName);

    int regresses(String customerId,String abbreviation,String outpatientName,String userAccount,String userId);

    //完成治疗
    int completionTreatment(String customerId,String abbreviation,String userId,String userAccount,String outpatientName);

    //回退
    String returnTo(String customerId,String abbreviation);

    //患者取消预约
    int cancelAppointmentok(String customerId, String remarks,String abbreviation,String userId,String userAccount,String outpatientName);

    //患者离开
    int alreadyLeave(String customerId, String remarks,String abbreviation,String userId,String userAccount,String outpatientName);

    //点击确认
    int sureAppointment(String customerId,String abbreviation,String userId,String userAccount,String outpatientName);

    int no_sureAppointment(String customerId,String abbreviation,String userId,String userAccount,String outpatientName);

    //回退
    int fallbackAction(String customerId, String arrivalStatus,String abbreviation,String userId,String userAccount,String outpatientName);

    //添加随访
    int addDoctorContent(String customerId, String doctor, String revisitTime,
                         String remarks, String reservationsId, String arrivalStore,String outpatientName);

    //保存在随访
    int addDoctorContent2(String customerId, String doctor, String revisitContent, String revisitTime,
                          String remarks, String reservationsId, String arrivalStore, String createName, String revisit,String userAccount,String userId,String outpatientName,String abbreviation);

    //表格中 修改  保存在随访
    int addDoctorContents(String customerId, String doctor, String revisitTime,
                          String remarks, String reservationsId, String arrivalStore, String createName, String revisit,String outpatientName,String abbreviation);

    //随访完成
    int addDoctorContent3(String customerId, String doctor, String revisitContent, String revisitTime,
                          String remarks, String reservationsId, String arrivalStore, String createName, String revisit,String userAccount,String userId,String outpatientName,String abbreviation);

    //随访未完成
    int addDoctorContent4(String customerId, String doctor, String revisitContent, String revisitTime,
                          String remarks, String reservationsId, String arrivalStore, String createName, String revisit,String outpatientName,String abbreviation);

    //随访取消
    int addDoctorContent5(String customerId, String doctor, String revisitContent, String revisitTime,
                          String remarks, String reservationsId, String arrivalStore, String createName, String revisit,String outpatientName,String abbreviation);

    int updateDoctorContent(String doctor, String createName,
                            String revisitTime, String revisitContent, String doctorVisitId,
                            String remarks, String customerId, String reservationsId, String revisit,String userAccount,String userId,String outpatientName,String abbreviation);

    int updateDoctorContent1(String doctor, String createName,
                             String revisitTime, String revisitContent, String doctorVisitId,
                             String remarks, String reservationsId, String customerId, String revisit,String userAccount,String userId,String outpatientName);

    int updateDoctorContent2(String doctor, String createName,String revisitTime, String revisitContent, String doctorVisitId,
                             String remarks, String reservationsId, String revisit);

    //看诊项目
    List<DoctorDiagnosisInfo> diagnoseList(String reservationsId);

    //上传图片
    String uploadIcon(MultipartFile picture, String cri, String outpatientName,  String abbreviation,  String userAccount, String userId);

    List<IconInfo> getIconInfo( String cri, String areaAbbreviation);

    //上传补牙图片
    String uploadIcons( MultipartFile picture,  String abbreviation,
                        String outpatientName, String userAccount,  String cri);

    //补牙上传重命名
    String submissionUploadIcons(String cri,String abbreviation,String outpatientName,String userAccount);

    List<ApprovalProcessInfo> getImg(String num);

    List<IconInfo> getIntelligentImgcancel1(String reservationsId, String num);

    List<IconInfo> getIntelligentImgcancel(String reservationsId, String num);

    //删除图片
    int delteProcess(String id) throws Exception;

    int delteProcess2(String id) throws Exception;

    int delteProcess4(String customerId) throws Exception;

    int deleteScoringIcons(String num) throws Exception;

    //医生排班
    List<DoctorSchedulingInfo> findDoctorSchedulingList(String startDate, String endDate, String outpatientName);

    //修改医生排班信息
    int updateDoctorStatus(String doctorName, String doctorId, String docTime, String docStatus, String outpatientName,String userAccount);

    //查找当前医生的数据源
    List<ConsultantInfo> getDataListByDoctor( String timeSlot, String abbreviation);

    //获取医生当前的休息状态
    String getDoctorStatus(String doctor, String value,String outpatientName);

    //获得此医生本周休息的日期
    List<DoctorSchedulingInfo> getRestingState(@PathVariable String timeSlot,@PathVariable String outpatientName);

    //当前个人医生视图查找数据源  传开始时间和结束时间(一周时间)  医生ID
    List<ConsultantInfo> getDataDoctor(@PathVariable String timeSlot,@PathVariable String abbreviation);

    //
    List<ConsultantInfo> getOneDoctor(@PathVariable String timeSlot,@PathVariable String abbreviation);

    //上传根管
    String upLoadOrthodontics1(MultipartFile picture, String cri, String userAccount);

    //上传正畸
    String upLoadOrthodontics(MultipartFile picture, String cri, String userAccount);

    //上传修复
    String upLoadRootCanal(MultipartFile picture, String cri,String userAccount);

    //上传洁牙
    String uploadScaling(MultipartFile picture, String cri,String userAccount);

    //上传牙周
    String uploadPeriodontal(MultipartFile picture, String cri,String userAccount);

    //上传种植
    String uploadPlantScoreFirst(MultipartFile picture, String cri,String userAccount);

    //上传修复
    String uploadRepair(MultipartFile picture, String cri,String userAccount);

    //缓存上传正畸
    int storageOrthodontics(String reservationsId, String num, String doctor, String nurse, String customerName, String sex,
                            String orthodonticsAge, String orthodonticDesign,
                            String congestionDegree, String coveringCoverage, String molarRelationship,
                            String canineRelationship, String designScheme, String userAccount, String outpatientName);

    //正畸 初诊 暂存打分
    int orthodonticScoring(String reservationsId, String num, String a1, String a2, String a3, String a4, String a5, String a6, String a7, String C1, String C2, String C3,
                           String C4, String C5, String C6, String degreeRadio, String expertComment1, String expertComment2, String userAccount);

    //提交上传正畸
    int subOrthodontics(String reservationsId, String num, String doctor, String nurse, String customerName, String sex, String orthodonticsAge, String orthodonticDesign,
                        String congestionDegree, String coveringCoverage, String molarRelationship, String canineRelationship, String designScheme,
                        String medicalRecordNumberValue,String userAccount,String outpatientName);

    //提交上传正畸2
    int subOrthodontics2(String reservationsId, String num, String doctor, String nurse, String customerName, String sex, String orthodonticsAge, String orthodonticDesign,
                         String congestionDegree, String coveringCoverage, String molarRelationship, String canineRelationship, String designScheme,
                         String medicalRecordNumberValue,String userAccount,String outpatientName);

    //缓存上传正畸完成
    int storageOrthodonticsd(String reservationsId, String num, String doctor, String nurse, String molarTooth, String canineTooth, String overlap, String userAccount);

    //提交正畸打分
    int subCore(String reservationsId, String num, String a1, String a2, String a3, String a4, String a5, String a6, String a7,
                String C1, String C2, String C3, String C4, String C5, String C6, String degreeRadio, String expertComment1, String expertComment2, String userAccount);
    //提交正畸完成打分
    int subCoreB(String reservationsId, String num, String b1, String b2, String b3, String b4, String b5);
    int subOrthodonticsd(String reservationsId, String num, String doctor, String nurse, String molarTooth, String canineTooth, String overlap, String medicalRecordNumberValue, String userAccount);
    //删除正畸初诊 暂存
    int deleteOrthodonticScore(String ids);
    //删除正畸完成 暂存
    int deleteOrthodonticScore1(String ids);

    int storagePlant(String reservationsId, String num, String customerName, String doctor, String nurse,String userAccount,String outpatientName );
    int subPlant(String reservationsId, String num, String doctor1, String nurse1, String customerName,String userAccount,String outpatientName);

    int deleteSubPlant(String ids);

    int storageRootCanal(String reservationsId, String num, String treatmentTypes, String consumptionAmount, String toothPositionA,
                         String toothPositionB, String toothPositionC, String toothPositionD, String toothPosition, String doctor, String nurse, String customerName,String userAccount,String outpatientName);

    //提交根管上传
    int subRootCanal(String reservationsId, String num, String treatmentTypes, String consumptionAmount, String toothPositionA, String doctor, String nurse, String customerName,
                     String toothPositionB, String toothPositionC, String toothPositionD, String toothPosition,String userAccount,String outpatientName);

    int deleteRootCanal(String ids);
    int storagePeriodontal(String reservationsId, String num, String customerName, String doctor, String nurse,String userAccount,String outpatientName);
    int subPeriodontal(String reservationsId, String num, String doctor, String nurse, String customerName,String userAccount,String outpatientName);
    int deleteStoragePeriodontal(String ids);

    int storageScaling(String reservationsId, String num, String customerName, String doctor, String nurse,String userAccount,String outpatientName);

    int subScaling(String reservationsId, String num, String doctor, String nurse, String customerName,String userAccount,String outpatientName);

    int deleteSubScaling(String ids);

    //修复
    int storageRepair(String reservationsId, String num, String customerName, String doctor, String nurse,String userAccount,String outpatientName);
    int subRepair(String reservationsId, String num, String doctor, String nurse, String customerName,String userAccount,String outpatientName);

    int subRepair(String id);
    int deleteSubRepair(String ids);
    int deleteRootCanalImgs(String id);
    int deleteScalingImgs(String id);
    int deletePeriodontalImgs(String id);
    int deleteOrthodontics(String id);
    int deletePlantImgs(String id);
    int deleteRepairImgs(String id);

    int addDiagnose(String projectCategory, String projectName ,String userAccount);

    int updateDiagnose(String id, String projectCategory, String projectName,String userAccount);

    int deleteDiagnose(String id);

    //获取补牙影像列表
    List<QualityAssuranceInfo> getList( String reservationsId);


}